package com.tbs.easyhomemoneyserver.dao;

import com.tbs.easyhomemoneyserver.DO.ApiLimit;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * JPA Dao层的固定写法
 */
@Repository //类似Mapper
public interface ApiLimitDao extends CrudRepository<ApiLimit, Long>//类似BaseMapper
{
    /**
     * 查询权限
     *
     * @param url    api路径
     * @param enable 是否启用
     * @return
     */

    List<ApiLimit> findAllByUrlAndEnable(String url, Integer enable);
}
